MCP Tools
It is possible to make tools available to the agent so that it can perform more complex tasks. The tools are made available to the language model, and it decides whether it is necessary to request their execution at a given moment. The language model itself will decide when to execute them and will also fill in the parameter values, if any, using the information from the prompt and the conversation messages.
There are three different types of tools on the platform: Scripts, MCP, and Searches. In this section, we will explain how to configure MCP (Model Context Protocol) tools.
Model Context Protocol
The Model Context Protocol (MCP) is an open protocol that allows AI language models to securely interact with external systems, tools, and resources. It provides a standardized way for applications to:
- Connect to external servers that expose capabilities and tools
- Enable models to call functions and access resources available on those servers
- Maintain security through controlled access and authentication
- Exchange context and data in a structured manner
MCP is designed to be language-agnostic and can work with any application that implements the protocol. Within the Cognitive platform, MCP enables your assistants to leverage tools exposed by MCP servers you connect to the system.
MCP Architecture in the Platform
The MCP implementation on the CogSol platform follows this architecture:
- MCP Server: An external service that implements the MCP protocol and exposes a set of tools/functions
- Server Registration: The platform registers the server with connection details (URL, headers)
- Tool Discovery: The platform queries the server to discover available tools.
- Tool Selection: You select which tools from the server to be available in the tenant.
- Tool Configuration: You select which MCP tools from the server to be active as a tool for your assistants.
- Tool Execution: When the model decides to use a tool, the platform routes the call to the MCP server.
Creating and Configuring MCP Tools
The process to set up MCP tools in your assistant involves four main steps:
Step 1: Register an MCP Server
Before you can use any MCP tools, you must register the MCP server that provides those tools. To do this:
- Navigate to the Assistant configuration
- Go to the Tools section
- Select MCP Servers
- Click New to create a new MCP server configuration
- Fill in the server configuration with only the required fields:
- Name Required: A descriptive name for the server (e.g. "DeepWiki Server")
- URL Required: The endpoint where the MCP server is accessible (e.g.,
https://mcp.deepwiki.com/mcp) - Description: What tools this server provides or a brief overview of its capabilities
- Headers (optional): Any HTTP headers needed for authentication (e.g., API keys, authorization tokens)
The platform automatically manages the following fields during server registration:
- Protocol Version: Automatically detected and set by the backend during connection
- Client Name: Automatically set to
cognitive-mcp-client - Client Version: Automatically set to the current platform version (e.g.,
1.0.0) - Active: Set to true to enable the server
Example Server Configuration Request:
{
"name": "Deep Wiki Server",
"description": "MCP from Deepwiki for GitHub repository documentation",
"url": "https://mcp.deepwiki.com/mcp",
"headers": {},
"active": true
}
Example Server Response (after registration):
{
"id": 102,
"name": "Deep Wiki Server",
"description": "MCP from Deepwiki for GitHub repository documentation",
"url": "https://mcp.deepwiki.com/mcp",
"headers": {},
"protocol_version": "2025-03-26",
"client_name": "cognitive-mcp-client",
"client_version": "1.0.0",
"active": true,
"created_at": "2025-10-22T11:24:34.647448-03:00",
"updated_at": "2025-10-22T11:24:34.647466-03:00"
}
Step 2: Discover Available Tools
The platform automatically queries the server to discover all available tools:
Discovery Response Example:
{
"tools": [
{
"name": "read_wiki_structure",
"description": "Get a list of documentation topics for a GitHub repository",
"input_schema": null,
"parameters": [
{
"name": "repoName",
"type": "string",
"description": "GitHub repository: owner/repo (e.g. \"facebook/react\")",
"required": true,
"enum": null,
"properties": null
}
],
"already_configured": false
},
{
"name": "read_wiki_contents",
"description": "View documentation about a GitHub repository",
"input_schema": null,
"parameters": [
{
"name": "repoName",
"type": "string",
"description": "GitHub repository: owner/repo (e.g. \"facebook/react\")",
"required": true,
"enum": null,
"properties": null
}
],
"already_configured": false
},
{
"name": "ask_question",
"description": "Ask any question about a GitHub repository",
"input_schema": null,
"parameters": [
{
"name": "repoName",
"type": "string",
"description": "GitHub repository: owner/repo (e.g. \"facebook/react\")",
"required": true,
"enum": null,
"properties": null
},
{
"name": "question",
"type": "string",
"description": "The question to ask about the repository",
"required": true,
"enum": null,
"properties": null
}
],
"already_configured": false
}
],
"configured_tools": []
}
Step 3: Select Tools to Configure
Choose which tools you want to enable for your assistant:
{
"selected_tools": [
"read_wiki_structure",
"read_wiki_contents",
"ask_question"
]
}
Important: You do NOT directly call individual tool endpoints. Instead, you select which tools from the server's catalog you want to enable by their names. The platform handles all communication with the MCP server internally.
Step 4: Make Tools Available to the Assistant
After configuring tools on the MCP server:
- In your assistant's configuration, go to the Tools section
- Add the MCP server to your assistant's Available Tools list
- The configured tools from that server will now be available to your model during conversations
- When the model decides a tool is needed, it will automatically call it through the MCP protocol
Assistant Configuration Response Example:
{
"id": 102,
"name": "Deep Wiki Server",
"description": "MCP from Deepwiki for GitHub repository documentation",
"url": "https://mcp.deepwiki.com/mcp",
"headers": {},
"protocol_version": "2025-03-26",
"client_name": "cognitive-mcp-client",
"client_version": "1.0.0",
"active": true,
"created_at": "2025-10-22T11:24:34.647448-03:00",
"updated_at": "2025-10-22T11:41:34.331018-03:00"
}
How the Model Uses MCP Tools
When you enable MCP tools for an assistant:
-
Tool Information Sent to Model: The model receives:
- Tool name
- Tool description
- Parameter names and types
- Parameter descriptions
- Whether parameters are required or optional
-
Decision Making: The model reads the user's prompt and decides if any available tools would be helpful
-
Tool Invocation: If the model decides a tool is needed:
- It formulates a call with appropriate parameters
- The platform sends this to the MCP server
- The server executes the tool and returns the result
- The result is sent back to the model for further processing
-
Response Generation: The model incorporates the tool results into its final response to the user
MCP Server and Tool Configuration
Once you've registered an MCP server and configured tools, the platform maintains this information:
Server Configuration
Each registered MCP server stores:
- Basic Info: name, description, URL
- Authentication: headers for API keys or authentication tokens
- Connection Details: protocol_version, client_name, client_version (auto-managed)
- Status: active flag to enable/disable the server
Tool Configuration
Once tools are selected from a server:
- Each tool maintains its metadata (name, description, parameters)
- The
already_configuredflag indicates if a tool has been set up - Tool parameters are discovered from the server and sent to the model for decision-making